package com.blb.java09mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("score") //配置表名
public class Score {

  @TableId(type = IdType.AUTO) //配置主键，type为自增
  private long scoreId;

  private long scoreStuId;
  private long scoreCourseId;
  private long scoreScore;

  @TableField(exist = false) //设置属性在表中不存在
  private Student student;

  @TableField(exist = false) //设置属性在表中不存在
  private Course course;

  public Score(long scoreId, long scoreStuId, long scoreCourseId, long scoreScore) {
    this.scoreId = scoreId;
    this.scoreStuId = scoreStuId;
    this.scoreCourseId = scoreCourseId;
    this.scoreScore = scoreScore;
  }

  public Student getStudent() {
    return student;
  }

  public void setStudent(Student student) {
    this.student = student;
  }

  public Course getCourse() {
    return course;
  }

  public void setCourse(Course course) {
    this.course = course;
  }

  public long getScoreId() {
    return scoreId;
  }

  public void setScoreId(long scoreId) {
    this.scoreId = scoreId;
  }


  public long getScoreStuId() {
    return scoreStuId;
  }

  public void setScoreStuId(long scoreStuId) {
    this.scoreStuId = scoreStuId;
  }


  public long getScoreCourseId() {
    return scoreCourseId;
  }

  public void setScoreCourseId(long scoreCourseId) {
    this.scoreCourseId = scoreCourseId;
  }


  public long getScoreScore() {
    return scoreScore;
  }

  public void setScoreScore(long scoreScore) {
    this.scoreScore = scoreScore;
  }


  @Override
  public String toString() {
    return "Score{" +
            "scoreId=" + scoreId +
            ", scoreStuId=" + scoreStuId +
            ", scoreCourseId=" + scoreCourseId +
            ", scoreScore=" + scoreScore +
            ", student=" + student +
            ", course=" + course +
            '}';
  }
}
